




/*
*************************************************************************
*西瑞克斯研发管理系统
*版 本: 1.0   
*日 期：02/08/2012    
*作 者： 王浩 QQ：873987060   
*************************************************************************   
*/ 
package com.application.model.service;
import java.util.List;
import com.manager.BaseService;
import com.manager.commons.page.PageBean;
import com.application.model.entity.Model;
import com.application.model.struts.form.ModelForm;
import com.application.model.dao.ModelDAO;
 /**
 * 
 * Description:ModelService<br />
 * 
 * Version:V0.1<br />
 * 
 * Author: 左磊 QQ：30575951    <br />
 * 
 * History: <br />
 * 
 * 02/08/2012 
 * 
 */
public class ModelService extends BaseService
{
	private ModelDAO modelDAO;

	public ModelDAO getModelDAO() {
		return this.modelDAO;
	}

	public void setModelDAO(ModelDAO modelDAO) {
		this.modelDAO = modelDAO;
	}
        

        public Model getModel(Model model) {
		return (Model) this.getBaseDao().queryByPk(model, model.getId());
	}
	
	public Integer getAllCountModel(ModelForm modelForm){
		return this.modelDAO.getAllCountModel(modelForm);
	}
	
	public List<Model> searchModel(ModelForm modelForm, PageBean pageBean) throws Exception {
		List<Model> modelList = (List) this.modelDAO.searchModel(modelForm, pageBean);
		return modelList;
	}
        
        public void deleteModels(ModelForm modelForm){
	   this.modelDAO.deleteModels(modelForm);	 
	}
        public List searchModel(final ModelForm modelForm) {
    		List<Model> modelList = (List) this.modelDAO.searchModel(modelForm);
    		return modelList;
    	}
        public List<Model> searchModelMenu(String fid){ 
        	return this.modelDAO.searchModelMenu(fid);
        }
        public List<Model> searchModelMenu(String fid, String uid){ 
        	return this.modelDAO.searchModelMenu(fid,uid);
        }
}
